<?php

	include("../inc/joomlaInt_admin.php");
	include("../inc/inc_configuration.php");


if ($jUser==0)
{
	echo "Bitte zuerst einloggen!";
}
else
{
	
	$q="SELECT gid FROM $tbl_users WHERE id=$jUser";
					$qe=mysql_query($q);
					$qeo=mysql_fetch_object($qe);
					
					$gid=$qeo->gid;
					
					if ($gid!=$admingroup)
					{
						echo "Du bist kein Admin!";
						break;
					}
					
	$start=$_POST["start"];
	$end=$_POST["end"];
	$text=$_POST["text"];
	$color=$_POST["color"];
	
	$liga=$_SESSION["liga"];


	$eintrag = "INSERT INTO $tbl_rankings (start, end, text, color, leagueId) VALUES ($start, $end, '$text', '$color', $liga)";
	$eintragen = mysql_query($eintrag);
	
	echo 'Sie werden weitergeleitet... <meta http-equiv="refresh" content="0; URL=rankings.php?liga=',$liga,'">   ';
}	
?>